-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Align with huggingface beam search #646
Conversation
1558da0
to
086b848
Compare
086b848
to
aa84c92
Compare
5eb3ab4
to
2374db0
Compare
2374db0
to
f1e5c4a
Compare
@hsm1997 Thank you for your great contribution! The changes you make are a bit complicated. Can we schedule a chat to discuss about this PR? I cannot find your email address. Can you send me an email at |
A minor fix with this PR:
We need to keep the history with best_of setting, or we may lose the highest score, since n in sampling_params only means for the output token, not in the searching stage. |
main modifications
update
: keep at-most num_beams finished seqs (beam_hyps) and at-most num_beams running seqs in seq_group._decode
and_stop
function to scheduler (from llm_engine).Sequence
toSequenceData
example